#!/usr/bin/python

from ceorModule import *
import time

from optparse import OptionParser
parser = OptionParser("usage:  %prog [options] arg1 ")
parser.add_option("-N", "--Npart", dest="N")

######################################
################ MAIN ################
## Is a 2-D box with lenght xL yL
if __name__ == "__main__":
  # And God says...
  (options, args) = parser.parse_args()
  if options.N == None: N  = 891  
  else: N = int(options.N)
  KT_eq = 0.1
  eps = 1.0
  sigma = 1.0
  delta_r_ini = sigma
  Lx = 100
  Ly =  10
  gas = Gas2D(Lx, Ly, N, KT_eq, delta_r_ini)
  tic = time.time()
  gas.initPos()
  gas.arrayPos()
  gas.arrayVel()
#  for pi in gas.particle:
#    pi.vy_new = 0.0
  gas.savetxt("N_"+str(N).zfill(6)+"_Lx_"+str(Lx)+"_Ly_"+str(Ly)+"_t_0000.dat")
  toc = time.time()
  print toc-tic
  gas.plot()
  
#  gas.loadtxt()
